package com.suoluo.zenadmin.dao.bigimage;

import java.util.List;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

import com.suoluo.zenadmin.vo.bigimage.BigImageVO;

@DAO
public interface BigImageDAO {

	@SQL("select * from tb_big_image ")
	public List<BigImageVO> findListBigImage();
	
	@SQL("insert into tb_big_image(t_image_type,t_image_title," +
			"t_image_desc,t_link_url,t_orig_image) " +
			"values(:1.imageType,:1.imageTitle,:1.imageDesc,:1.linkUrl,:1.origImage)")
	public void saveBigImage(BigImageVO imageVO);
	
	@SQL("select * from tb_big_image where t_image_id=:1")
	public BigImageVO findBigImageById(int imageId);
	
	
	@SQL("update tb_big_image set t_image_type=:1.imageType,t_image_title=:1.imageTitle," +
			"t_image_desc=:1.imageDesc,t_link_url=:1.linkUrl,t_orig_image=:1.origImage " +
			"where t_image_id=:1.imageId")
	public void updateBigImage(BigImageVO imageVO);
	
	
	@SQL("delete from tb_big_image where t_image_id=:1")
	public void deleteBigImage(int imageId);
	
	@SQL("select * from tb_big_image where t_image_type=:1 order by t_image_id desc")
	public List<BigImageVO> findBigImageByType(int type);
}
